package datastructure.board.elements;

import common.GameConstants;
import common.Position;

public class BoardElement {
    private Position position;

    /**
     * creates a new BoardElement
     * @param pos the position of the element
     */
    public BoardElement(Position pos){
        position = pos;
    }

    /**
     * @param x the x-coordinate on the board
     * @param y the y-coordinate on the board
     * @param direction the direction the element is facing
     */
    public BoardElement(int x, int y, GameConstants.direction direction){
        position = new Position(x,y,direction);
    }

    /**
     * @return the position of the element in the boardGrid
     */
    public Position getPositionInGrid() {
        return position;
    }

    /**
     * @return the direction the element is pointing
     */
    public GameConstants.direction getDirection(){
        return position.getDirection();
    }

    /**
     * @return the x coordinate of the element
     */
    public int getX(){
        return position.getX();
    }

    /**
     * @return the y coordinate of the element
     */
    public int getY(){
        return position.getY();
    }
}
